<?php

/*!
 * \file Ue.php
 * \namespace Site\GeneralBundle\Entity
 * \class Ue
 *
 * \author Antonin Barthélémy
 *
 * \brief Classe étant une entité et permettant de stocker les Ues.
 */

namespace Site\GeneralBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Ue
 *
 * @ORM\Table()
 * @ORM\Entity
 */
class Ue
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\OneToMany(targetEntity="Site\ProjetBundle\Entity\Projet",mappedBy="ue")
     */
     private $projets;

     /**
      * @ORM\OneToMany(targetEntity="Site\UtilisateurBundle\Entity\Etudiant",mappedBy="ue")
      */
      private $etudiants;

    /**
     * @var string
     *
     * @ORM\Column(name="code", type="string", length=255)
     */
    private $code;

    /**
     * @var string
     *
     * @ORM\Column(name="nom", type="string", length=255)
     */
    private $nom;


    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set code
     *
     * @param string $code
     * @return Ue
     */
    public function setCode($code)
    {
        $this->code = $code;

        return $this;
    }

    /**
     * Get code
     *
     * @return string
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * Set nom
     *
     * @param string $nom
     * @return Ue
     */
    public function setNom($nom)
    {
        $this->nom = $nom;

        return $this;
    }

    /**
     * Get nom
     *
     * @return string
     */
    public function getNom()
    {
        return $this->nom;
    }
}
